all ::

TARGETDIR=@TARGETDIR@

include ../make/ptlib.mak

HAS_ALSA	= 

ifeq (1,$(HAS_ALSA))
SUBDIRS		+= sound_alsa
ifeq (,$(DEFAULT_SOUND))
DEFAULT_SOUND	= sound_alsa
endif
endif

HAS_OSS		= 

ifeq (1,$(HAS_OSS))
SUBDIRS += sound_oss
ifeq (,$(DEFAULT_SOUND))
DEFAULT_SOUND	= sound_oss
endif
endif

HAS_ESD		= 

ifeq (1,$(HAS_ESD))
SUBDIRS += sound_esd
ifeq (,$(DEFAULT_SOUND))
DEFAULT_SOUND	= sound_esd
endif
endif

HAS_SUNAUDIO = 

ifeq (1,$(HAS_SUNAUDIO))
SUBDIRS += sound_sunaudio
ifeq (,$(DEFAULT_SOUND))
DEFAULT_SOUND   = sound_sunaudio
endif
endif

HAS_V4L		= 1

ifeq (1,$(HAS_V4L))
SUBDIRS += vidinput_v4l
ifeq (,$(DEFAULT_VIDINPUT))
DEFAULT_VIDINPUT	= vidinput_v4l
endif
endif

HAS_V4L2	= 1

ifeq (1,$(HAS_V4L2))
SUBDIRS += vidinput_v4l2
ifeq (,$(DEFAULT_VIDINPUT))
DEFAULT_VIDINPUT	= vidinput_v4l2
endif
endif

HAS_BSDVIDEOCAP		= 

ifeq (1,$(HAS_BSDVIDEOCAP))
SUBDIRS += vidinput_bsd
ifeq (,$(DEFAULT_VIDINPUT))
DEFAULT_VIDINPUT	= vidinput_bsd
endif
endif

HAS_AVC1394		= 

ifeq (1,$(HAS_AVC1394))
SUBDIRS += vidinput_avc
ifeq (,$(DEFAULT_VIDINPUT))
DEFAULT_VIDINPUT	= vidinput_avc1394
endif
endif

HAS_DC1394		= 

ifeq (1,$(HAS_DC1394))
SUBDIRS += vidinput_dc
ifeq (,$(DEFAULT_VIDINPUT))
DEFAULT_VIDINPUT	= vidinput_dc1394
endif
endif


ifdef   DEBUG
TARGET := debug
else
TARGET := opt
endif


$(subst tagbuild,,$(STANDARD_TARGETS)) ::
	set -e; $(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ ;)

default_sound:
	@echo $(DEFAULT_SOUND)
